<?php include COMMON_PATH.'/index/header.html' ?>

<div class="prior-home-wrap main-content">
    <div class="title-top clearfix">
        <span class="fl">我的发布 <i>（<?=$myAction['count']?>）</i></span>
        <a href="/Prior/add" class="fr">添加发布</a>
    </div>
    <ul class="prior-list-wrap">
        <?php foreach($myAction['lists'] as $k=>$v):?>
        <li class="clearfix">
            <div class="fl">
                <a href="/Prior/edit?llid=<?=$v['llid']?>" class="icon iconfont icon-bianji"></a>
                <span class="prior-data"><?=$v['date']?></span>
                <span class="prior-time"><?=$v['start_time']?> - <?=$v['end_time']?></span>
                <span class="prior-name"><?=$v['name']?></span>
            </div>
            <div class="fr right-wrap">
                <?php if($v['volume']):?>
                <span class="icon-view-5">考试</span>
                <i class="icon iconfont icon-wendang"></i>
                <?php endif;?>
                <span class="num-max-wrap"> <i class="icon iconfont icon-ren-copy-copy"></i> <?=$v['enrol']?></span>
                <span class="line-wrap"></span>
                <i class="icon iconfont icon-binkaobei" data-llid="<?=$v['llid']?>"></i>
            </div>
        </li>
        <?php endforeach;?>
    </ul>
    <div data-page-total="<?=$myAction['count']?>" data-page-per="<?=PAGE_NUMBER?>"  id="live-page-wrap"></div>
</div>

<?php include COMMON_PATH.'/index/footer.html' ?>

<script>
    navActive(5);
    $(function(){


        layui.use(['element','layer','form', 'laypage', 'laydate'], function() {
            var layer = layui.layer //获得layer模块
                    , laypage = layui.laypage //获得laypage模块
                    , laydate = layui.laydate //获得laydate模块
                    , form = layui.form //获得laydate模块
                    , element = layui.element;

            var $btn_del = $('.prior-list-wrap li .icon-binkaobei');
            $btn_del.on('click', function () {
                var el_li = $(this).parents('li');
                var llid = $(this).attr('data-llid');
                layer.open({
                    type: 1,
                    title: false,
                    resize: false,
                    shadeClose:false,
                    closeBtn:false,
                    content:'<div class="confirm-wrap" style="padding: 20px 30px">' +
                    '<p style="margin:4px 0 20px 0; text-align: center; ">确定删除此条预播信息？</p>' +
                    '<div style="display: inline-block">'+
                        '<span class="layui-btn layui-btn-normal btn-modify" style="margin-right: 10px;">确定</span>'+
                        '<span class="layui-btn layui-btn-primary" onclick="layer.closeAll();">取消</span>'+
                    '</div></div>',
                    success: function(layero, index){
                        $('.btn-modify').off('click').on('click',function(){
                            var param = {
                                url:'Prior/del',
                                data:{
                                    llid:llid
                                }
                            };
                            function successFun(data){
                                if(data.code==200){
                                    el_li.remove();
                                    layer.closeAll();
                                }else {
                                    layer.msg(data.data.message, {icon: 2,anim: 6,time:2*1000});
                                }
                            }
                            $.JsonRpc(param,successFun);


                        });
                    }


                });

            });

        })

    });
</script>
</html>



















